<template>
  <el-card>
    <div style="text-align: right">
      <el-button type="primary" size="small" @click="checkout()">新增评分</el-button>
      <el-button size="small" @click="(dialogVisibleSta = true), queryStatistics()">统计分析</el-button>
      <el-button size="small" @click="queryAndPrintAll">打印</el-button>
    </div>
    <h3 style="width: 100%; text-align: center; line-height: 30px">
      <img src="@/icons/img/changzhi.png" style="width: 30px; height: 30px;vertical-align: top"/>
      {{ this.$store.state.City }}医院 {{ this.$props.tableTitle }}
    </h3>
    <el-table
      :data="tableData"
      empty-text="暂无数据"
      row-key="id"
      stripe
    >
      <el-table-column
        align="center"
        fixed
        prop="date"
        width="90"
        label="日期"
      />
      <el-table-column
        align="center"
        fixed
        prop="time"
        width="60"
        label="时间"
      />
      <el-table-column align="center" fixed prop="signature" label="签名"/>
      <el-table-column align="center" fixed prop="score" label="总分"/>
      <el-table-column align="center" fixed label="护理措施">
        <template slot-scope="scope">
          {{ scope.row.nursingStep }}
        </template>
      </el-table-column>

      <el-table-column align="center" fixed label="其他措施">
        <template slot-scope="scope">
          {{ scope.row.otherStep }}
        </template>
      </el-table-column>
      <el-table-column
        v-for="(planItem, index) in planList"
        :key="index"
        align="center"
        :label="planItem.planLable"
      >
        <el-table-column
          v-for="(stageItem, indexChild) in planItem.stageList"
          :key="index + '-' + indexChild"
          align="center"
          :label="stageItem.stageLable"
        >
          <template slot-scope="scope">
              <span v-if="scope.row.isEditing">
                <el-input
                  v-model="scope.row.planList[index].stageList[indexChild].value"
                  size="mini"
                />
              </span>
            <span v-else>{{
                scope.row.planList[index].stageList[indexChild].value
              }}</span>
          </template>
        </el-table-column>
      </el-table-column>

      <el-table-column align="center" fixed="right" label="操作" width="150">
        <template slot-scope="scope">
          <el-button
            size="mini"
            @click="handleData(scope.row, scope.$index)"
          >{{ scope.row.isEditing ? "保存" : "编辑" }}
          </el-button
          >
          <el-popover
            trigger="click"
            :ref="`popover-${scope.$index}`"
            placement="top"
            width="100"
          >
            <p class="el-icon-warning">确定删除</p>
            <div style="text-align: right; margin: 0">
              <el-button
                size="mini"
                type="text"
                @click="no(scope)"
              >取消
              </el-button
              >
              <el-button
                type="primary"
                size="mini"
                @click="deleteData(scope)"
              >确定
              </el-button
              >
            </div>
            <el-button
              size="mini"
              slot="reference"
              style="margin-left: 10px"
              type="danger"
            >
              删除
            </el-button
            >
          </el-popover>
        </template>
      </el-table-column>
    </el-table>
    <div style="font-size: 12px; line-height: 22px">
      <el-row v-if="this.scoreRule != ''">
        <el-col style="width:100px;text-align: right;">注：评分规则：</el-col>
        <el-col :span="21">{{ this.scoreRule }}</el-col>
      </el-row>
      <el-row v-if="this.scoreOpportunity != ''">
        <el-col style="width:100px;text-align: right;">评估时机：</el-col>
        <el-col :span="21">{{ this.scoreOpportunity }}</el-col>
      </el-row>
      <el-row v-if="this.nursingStep != ''">
        <el-col style="width:100px;text-align: right;">护理措施：</el-col>
        <el-col :span="21">{{ this.nursingStep}}</el-col>
      </el-row>
    </div>
    <!-- 新增或修改评分 -->
    <el-dialog
      :title="addOrEditTitle"
      :visible.sync="dialogCheckVisible"
      width="70%"
    >
      <el-form ref="form">
        <div style="line-height: 60px;">
            <span style="font-size: 16px;font-weight: 700;color: #303133;">
              {{ tableTitle }}
              <!--              <el-tooltip-->
              <!--                content="数据采集应为病人入ICU或抢救开始后的24小时内最差值，并注明具体评分时间"-->
              <!--                placement="bottom"-->
              <!--                effect="light"-->
              <!--              ><i class="el-icon-question"></i>-->
              <!--              </el-tooltip>-->
            </span>
          <span style="float: right">
              <span>评分时间：</span>
              <el-date-picker
                v-model="time"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </span>
        </div>

        <el-form-item>
          <div
            style="padding-left: 10px;margin-top: 15px;border: 1px dashed #dad6d6;"
            v-for="(item, index) in equipments"
            :key="index"
          >
              <span
                style="padding-right: 10px;font-size: 14px;color: #606266;font-weight: 700;"
              >{{ item.scoreItemName }}
                <el-tooltip placement="bottom">
                  <div slot="content" style="max-width: 200px">
                    <span>{{
                        item.description === "" ? "无" : item.description
                      }}</span>
                  </div>
                  <i class="el-icon-question"/>
                </el-tooltip>
                ：</span
              >
            <el-checkbox-group
              v-model="checkList"
              @change="handleChange"
              v-if="item.mode == 0"
              style="display: contents">
              <el-checkbox
                v-for="data in item.data"
                :label="data.score + data.scoreItemName"
                :value="data.id"
                @change="checkboxChange(data)"
                :key="data.id">
                {{ data.score }}&nbsp;{{ data.scoreItemName }}
              </el-checkbox>
            </el-checkbox-group>

            <el-radio-group
              v-model="checkedEquipments[index]"
              @change="handleChange"
              v-if="item.mode == 1"
            >
              <el-radio
                v-for="data in item.data"
                :label="data.score + data.scoreItemName"
                :key="data.id"
                :value="data.id"
                @change="radioChang(data, index)"
              >
                {{ data.score }}&nbsp;{{ data.scoreItemName }}
              </el-radio>
            </el-radio-group>
          </div>
        </el-form-item>
        <el-form-item
          label="护士签名："
          label-width="82px"
          style="margin-bottom: 15px !important"
        >
          <el-select v-model="value" filterable placeholder="请选择">
            <el-option
              v-for="item in arr"
              :key="item.id"
              :label="item.user_name"
              :value="item.login_name"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          label="护理措施："
          label-width="82px"
          style="margin-bottom: 15px !important"
        >
          <el-select
            v-model="selectvalue"
            placeholder="请选择"
            style="width: 60%"
          >
            <el-option
              v-for="(item,index) in selectarr"
              :key="index"
              :label="item"
              :value="item"
            />
          </el-select>
        </el-form-item>
        <el-form-item
          label="其他措施："
          label-width="82px"
          style="margin-bottom: 15px !important"
          maxlength="255"
        >
          <el-input v-model="desc" type="textarea" style="width: 60%"/>
        </el-form-item>
      </el-form>

      <div style="height: 24px; margin: 15px 0px 15px; line-height: 24px">
          <span
            style="
              display: inline-block;
              width: 50%;
              font-size: 16px;
              color: #606266;
              font-weight: 700;
            "
          >总分：{{ this.num }}</span
          >
        <span
          style="
              display: inline-block;
              width: 50%;
              font-size: 16px;
              color: #606266;
              font-weight: 700;
            "
        >风险等级：{{ this.frameElement }}</span
        >
      </div>
      <span
        style="
            display: inline-block;
            font-size: 16px;
            color: #606266;
            font-weight: 700;
            padding-bottom: 15px;
          "
      >知识库：{{ this.description }}</span
      >

      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogCheckVisible = false">取 消</el-button>
        <el-button
          type="primary"
          @click="(dialogCheckVisible = false), preservation()"
        >保 存
        </el-button
        >
      </div>
    </el-dialog>

    <!-- 统计分析详情 -->
    <el-dialog
      title="统计分析"
      :visible.sync="dialogVisibleSta"
    >
      <span>评分时间：</span>
      <el-date-picker
        v-model="timetong"
        type="date"
        placeholder="选择日期"
        @change="queryStatistics"
        value-format="yyyy-MM-dd"
        format="yyyy-MM-dd"
      >
      </el-date-picker>
      <div style="line-height: 60px">
        <span style="font-size: 16px;font-weight: 700;color: #303133;"> {{ tableTitle }} </span>
        <span>
            <el-tooltip
              content="取最近300条数据绘制图表"
              placement="bottom"
              effect="light"
            ><i class="el-icon-question"></i> </el-tooltip
            >评分次数：{{ this.Nums }}</span
        >
      </div>
      <!-- echarts -->
      <div id="pie1">
        <div id="zhe" style="width: 100%; height: 300px"></div>
      </div>
    </el-dialog>
    <!-- 打印 -->
    <div v-show="printContent">
      <div id="fall-myheader">
        <div
          style="
              width: 100%;
              margin-top: 16px;
              text-align: center;
              font-size: 18px;
              font-weight: 600;
              height: 40px;
              line-height: 40px;
            "
        >
          <img
            src="@/icons/img/changzhi.png"
            style="width: 30px; height: 30px"
          />
          {{ this.$store.state.City }}医院 {{ tableTitle }}
        </div>
        <div>
          <div
            style="font-size: 14px;height: 30px;line-height: 30px;"
          >
            <div style="margin-right: 15px; float: left; font-size: 14px">
              科室：{{
                this.data.department_name === "" ? "" : this.data.department_name
              }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              床号：
              {{ this.data.bed_code === "" ? "" : this.data.bed_code }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              姓名：
              {{ this.data.name === "" ? "" : this.data.name }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              性别：
              {{ this.data.sex === "" ? "" : this.data.sex }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              年龄：
              {{ this.$store.state.user.severFall.ageOrMonthAge }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              住院号：
              {{ this.$store.state.user.severFall.visit_id }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              诊断：
              {{ this.data.diagnosis_name === "" ? "" : this.data.diagnosis_name }}
            </div>
            <div style="margin-right: 15px; float: left; font-size: 14px">
              日期：
              {{ this.data.visit_time === "" ? "" : this.data.visit_time }}
            </div>
          </div>
        </div>
      </div>
      <el-table
        id="fall-div"
        :data="tableData"
        border
        class=""
        row-key="id"
        stripe
        :header-cell-style="{
            background: '#d2e0f9',
            color: '#606266',
            fontSize: '12px',
            padding: '0',
          }"
        :cell-style="{ fontSize: '12px', padding: '0' }"
      >
        <el-table-column
          align="center"
          fixed
          prop="date"
          width="60"
          label="日期"
        />
        <el-table-column
          align="center"
          fixed
          prop="time"
          width="60"
          label="时间"
        />
        <el-table-column
          align="center"
          fixed
          prop="signature"
          label="签名"
          width="73"
        />
        <el-table-column
          align="center"
          fixed
          prop="score"
          label="总分"
          width="60"
        />
        <el-table-column align="center" fixed label="护理措施">
          <template slot-scope="scope">
            {{ scope.row.nursingStep }}
          </template>
        </el-table-column>

        <el-table-column align="center" fixed label="其他措施">
          <template slot-scope="scope">
            {{ scope.row.otherStep }}
          </template>
        </el-table-column>
        <el-table-column
          v-for="(planItem, index) in planList"
          :key="index"
          align="center"
          :label="planItem.planLable"
        >
          <el-table-column
            v-for="(stageItem, indexChild) in planItem.stageList"
            :key="index + '-' + indexChild"
            align="center"
            width="25"
            :label="stageItem.stageLable"
          >
            <template slot-scope="scope">
                <span v-if="scope.row.isEditing">
                  <el-input
                    v-model="
                      scope.row.planList[index].stageList[indexChild].value
                    "
                    size="mini"
                  />
                </span>
              <span v-else>{{
                  scope.row.planList[index].stageList[indexChild].value
                }}</span>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table>
    </div>
  </el-card>
</template>

<script>
import {
  getListByScoreName,
  queryDataByTypeAndScore,
  queryDataByName,
  patientScoreInsert,
  getPatientScoreList,
  deletePatientScore,
  getNursingStepsById,
  getEditDetail,
  queryDataByScoreAndType, findPage, getUserListByUserTypegetNurseList, //新增-统计分析
} from "@/api/table";
import {jyxdPrint} from "../../utils/jyxd-printer";
import {Message} from "element-ui";
import {dateUtils} from "@/utils/dateUtils";

export default {
  props: {
    tableTitle: String,
    type: String,
    scoreName: String
  },
  data() {
    return {
      printContent: false,
      printParam: {
        pageStartNumber: "",//设置页码信息
        table_id: "fall-div", //表实体div id，<el-table>表内容不能全空，至少有一行，即使是空行
        title_id: "fall-myheader", //表前抬头栏div 的id，如果没有或不需打印，去除此变量或置空或置"无"
        //tail_id: "mytail", //表后签字栏div 的id，如果没有或不需打印，去除此变量或置空或置"无"
        page_rows: 9, //首页行数，0，表示不分页
        second_rows: 8, //首页之外各页的行数，只在首页打印抬头的话首页行数和其它页行数会不同
        paper_height: "1050", //纸张长度，设为大于500的值表示自动按纸张长度分页，设其它值都按每页行数分页。
        //例如A4纸长度大概在1040-1400之间。
        //纸张长度分页优于按行数分页，设置纸张长度后，每页行数的设置被忽略不用。
        //严重折行的表格按纸张长度分页可能会造成分页错误，预览到错误后可以调整纸张长度纠正。
        paper_width: "1560",
        table_head: "", //非el-table表的表头id，表前部不变部分，用<tbody id=>  </tbody>括起来
        table_body: "text-align: left", //非el-table表的表体id，填充数据部分，用<tbody id=>  </tbody>括起来
        table_foot: "", //非el-table表的表脚id，表里不变部分，用<tbody id=>  </tbody>括起来
        button: "", //是否打印按钮，置"button"或"打印"表示输出按钮，去除此变量或置空将隐藏所有按钮
        title: "", //是否每页都要页面抬头，置"first"或"首页"表示只有首页打印抬头，去除此变量或置空所有页面都有抬头
        tail: "", //是否每页都要页面签字栏，置"first"或"首页"表示只有首页打印签字栏，去除此变量或置空所有页面都有签字栏
        blank: 0, //打印空表页数，空表保留所有上述格式，内容为空。0表示打印实际数据表。
        hidden_col: "", //隐藏列号范围，如 "0,2-4,9"，列号从0起计，去除此变量或置空表示打印所有列。复杂表头暂不支持列隐藏。
        preview: "预览", //是否仅仅预览？置"预览"表示仅展示在屏幕上，置空表示表示直接调用print()。
        thead_style: "font-size:15px",
        tbody_style: "font-size:15px",
        col_width: [
          {col: 0, width: 90}, //日期
          {col: 1, width: 70}, //时间
          {col: 2, width: 50}, //内容
          {col: 3, width: 55}, //实入量
          {col: 20, width: 160}, //护理记录
          {col: 21, width: 90}, //签名
        ],
        debug: "no", //不打印debug信息
      },
      //控制弹窗 显示
      dialogCheckVisible: false, //新增评分
      addOrEditTitle: '新增评分',
      dialogVisibleSta: false, //统计分析
      zhe: [], //折线图
      Nums: "",
      equipments: [],
      checkedEquipments: [],
      checkList: [],
      checkItemList: [],
      checkEquip: [],
      value: "",
      desc: "",
      selectvalue: "",
      arr: [],
      selectarr: [],
      num: 0,
      number: "",
      description: "",
      datalist: "",
      frameElement: "",
      name: "",
      data: {},
      score: "",
      time: "",
      date: "",
      editId: "",
      radioChekObj: [],
      scoreOpportunity: "",
      nursingStep: "",
      scoreRule: "",
      // 表格组件 列表数据对象
      tableData: [],
      planList: [],
      timetong: "",
    };
  },
  computed: {
    getData() {
      return this.$store.state.user.severFall;
    },
  },
  watch: {
    getData: {
      handler(nVal) {
        this.data = this.$store.state.user.severFall;
        this.getScoreList()
        this.findPageByPatientId();
      },
      deep: true,
    },
  },
  mounted() {
    this.data = this.$store.state.user.severFall;
    this.time = dateUtils(2);
    this.timetong = dateUtils(1);
    this.getRemarks();
    if (this.data.patient_id) {
      this.getScoreList();
      this.findPageByPatientId();
    }
  },
  created() {
    getUserListByUserTypegetNurseList({
      deptCode: this.$store.state.user.loginInfo.deptCode
    }).then((res) => {
      this.arr = res.data;
    });

    getListByScoreName({scoreName: this.$props.scoreName}).then((res) => {
      this.checkEquip = res.data;
      for (let i = 0; i < this.checkEquip.length; i++) {
        let checkArr = [];
        let item = this.checkEquip[i].data;

        if (item.length === 0) {
          this.checkedEquipments.push([]);
        } else {
          for (let j = 0; j < item.length; j++) {
            checkArr.push(item[j].score);
          }
          this.checkedEquipments.push(checkArr);
        }
      }
    });
  },
  methods: {
    //设置页码
    findPageByPatientId() {
      findPage({
        patientId: this.data.patient_id,
      }).then((res) => {
        if (res.data != null && res.data.length > 0) {
          this.printParam.pageStartNumber = res.data[0].pageNum;
        } else {
          this.printParam.pageStartNumber = "";
        }
      });
    },
    queryAndPrintAll() {
      jyxdPrint(this.printParam);
    },
    //统计分析
    //echarts
    queryStatistics() {
      queryDataByScoreAndType({
        type: this.$props.type,
        patientId: this.data.patient_id,
        scoreTime: this.timetong,
      }).then((res) => {
        if (res.msg === "暂无数据") {
          Message({
            message: "没有数据",
            type: "warning",
            duration: 1500,
          });
          this.$nextTick(function () {
            let myChart = this.$echarts.init(document.getElementById("zhe"));
            myChart.clear();
          });
        } else {
          const times = res.data;
          this.Nums = res.number;
          const namedata = res.array;
          this.$nextTick(function () {
            let myChart = this.$echarts.init(document.getElementById("zhe"));
            // 绘制图表
            myChart.setOption({
              title: {
                text: "分数",
                textStyle: {
                  fontSize: 16,
                  fontStyle: "normal",
                  fontWeight: "normal",
                },
              },
              tooltip: {
                trigger: "axis",
              },
              legend: {
                data: ["分数"],
                textStyle: {
                  fontSize: 14,
                  fontStyle: "normal",
                  fontWeight: "normal",
                },
                right: 26,
              },
              toolbox: {
                show: true,
              },
              xAxis: {
                type: "category",
                boundaryGap: false,
                data: times,
              },
              yAxis: {
                type: "value",
                axisLabel: {
                  formatter: "{value}",
                },
              },
              series: namedata,
            });
          });
        }
      });
    },

    //查询当前病人列表
    getScoreList() {
      getPatientScoreList({
        type: this.$props.type,
        patientId: this.data.patient_id,
        // status: 1,
      }).then((res) => {
        if(res.msg == "暂无数据"){
          this.tableData = [];
          this.planList = [];
        }else{
          this.tableData = res.data;
          this.planList = (this.tableData[0] && this.tableData[0]["planList"]) || [];
        }
      });
    },

    handleData(row, index) {
      this.radioChekObj = [];
      this.checkedEquipments = [];
      this.checkList = [];
      this.checkItemList = [];

      this.editId = row.id;
      this.time = row.date + " " + row.time;
      queryDataByTypeAndScore({type: this.datalist, score: row.score}).then(
        (res) => {
          this.description = res.data[0].description;
          this.frameElement = res.data[0].level;
          this.score = res.data[0].id;
        }
      );
      getEditDetail({type: this.datalist, patientScoreId: row.patientScoreId}).then((res) => {
        this.num = res.patientScore.score;
        this.value = res.patientScore.signature;
        this.desc = res.patientScore.otherStep;
        this.selectvalue = res.patientScore.nursingStep;
        let tempData = res.data;

        for (let z = 0; z < tempData.length; z++) {
          for (let n = 0; n < tempData[z].data.length; n++) {
            if (tempData[z].data[n].flag) {
              //多选与单选需分别处理
              if(tempData[z].mode == 0){
                this.checkList.push(tempData[z].data[n].score + tempData[z].data[n].scoreItemName);
                this.checkItemList.push({
                  id: tempData[z].data[n].id,
                  parentId: tempData[z].data[n].parentId
                })
              }else{
                this.checkedEquipments[z] = tempData[z].data[n].score + tempData[z].data[n].scoreItemName;
                this.radioChekObj[z] = {id: tempData[z].data[n].id, parentId: tempData[z].data[n].parentId,};
              }
            }
          }
        }

        this.equipments = res.data;
        this.dialogCheckVisible = true;
        this.addOrEditTitle = '编辑评分';
      });
    },
    deleteData(scope) {
      deletePatientScore({
        patientScoreId: scope.row.patientScoreId
      }).then((res) => {
        this.$message({message: "删除成功", type: "success"});
        this.getScoreList();
        scope._self.$refs[`popover-${scope.$index}`].doClose();
      });
    },
    no(scope) {
      this.$message("取消删除");
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    checkout() {
      if (
        typeof this.data.patient_id != "string" ||
        this.data.patient_id.length < 1
      ) {
        alert("请选择一次病人");
        return;
      }

      //新增初始化
      this.time = dateUtils(2);
      this.dialogCheckVisible = true;
      this.num = 0;
      this.value = "";
      this.desc = "";
      this.selectvalue = "";
      this.frameElement = "";
      this.description = "";
      this.editId = "";

      this.checkedEquipments = [];
      this.radioChekObj = [];
      this.checkList = [];
      this.checkItemList = [];

      getListByScoreName({scoreName: this.$props.scoreName}).then((res) => {
        this.equipments = res.data;
      });

    },
    //多选框数据变化
    checkboxChange(data) {
      let item = data.score + data.scoreItemName;

      if (this.checkList.indexOf(item) > -1) {
        this.checkItemList.push({
          id: data.id,
          parentId: data.parentId
        })
      } else {
        for (let i = 0; i < this.checkItemList.length; i++) {
          if (this.checkItemList[i].itemId == data.id) {
            this.checkItemList.splice(i, 1);
            break;
          }
        }
      }
    },
    //弹框选中数据
    radioChang(item, index) {
      this.radioChekObj[index] = item;
    },
    handleChange() {
      let number = 0;
      this.checkedEquipments.map((item, index) => {
        if (!isNaN(parseInt(item))) {
          number += parseInt(item);
        }
      });

      this.checkList.map((item, index) => {
        if (!isNaN(parseInt(item))) {
          number += parseInt(item);
        }
      });

      this.num = number;

      queryDataByTypeAndScore({type: this.datalist, score: this.num}).then(
        (res) => {
          this.description = res.data[0].description;
          this.frameElement = res.data[0].level;
          this.score = res.data[0].id;
        }
      );
    },
    //获取评分备注
    getRemarks() {
      queryDataByName({scoreName: this.$props.scoreName}).then((res) => {
        this.datalist = res.data.type;
        this.scoreRule = res.data.scoreRule;
        this.scoreOpportunity = res.data.scoreOpportunity;
        this.nursingStep = res.data.nursingStep;
        //护理措施
        getNursingStepsById({id: res.data.id}).then((res) => {
          this.selectarr = res.data;
        });
      });
    },
    //保存
    preservation() {
      let radioChekList = [];
      this.radioChekObj.forEach((item) => {
        radioChekList.push({
          itemId: item.id,
          parentId: item.parentId,
          content: "",
          extraContent: "",
        });
      })
      this.checkItemList.forEach((item) => {
        radioChekList.push({
          itemId: item.id,
          parentId: item.parentId,
          content: "",
          extraContent: "",
        });
      })

      patientScoreInsert({
        visitId: this.data.visit_id,
        visitCode: this.data.visit_code,
        patientId: this.data.patient_id,
        type: this.datalist,
        scoreTime: this.time,
        score: this.num,
        scoreKnowledgeId: this.score,
        reportTime: "",
        assessmentTime: "",
        nursingStep: this.selectvalue,
        otherStep: this.desc,
        signature: this.value,
        mortalityRate: "",
        extendColumn: "",
        id: this.editId,
        list: JSON.stringify(radioChekList),
      }).then((res) => {
        if (res.code === 200) {
          Message({message: res.msg, type: "success"});
          this.getScoreList();
        } else {
          Message({message: res.msg, type: "error"});
        }
      });
    }
  },
};
</script>
